// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.


#ifndef ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_OHOS_H_
#define ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_OHOS_H_

#include <memory>
#include <string>

#include "shell/browser/ui/tray_icon.h"
#include "ohos/adapter/tray_manager/status_bar_manager.h"

class StatusIconLinuxDbus;

namespace electron {

class StatusIconGtk;

class TrayIconOhos : public TrayIcon {
 public:
  TrayIconOhos();
  ~TrayIconOhos() override;

  // TrayIcon:
  void SetImage(const gfx::Image& image) override;
  void SetImage(const gfx::Image& white_image,
                const gfx::Image& black_image) override;
  void SetToolTip(const std::string& tool_tip) override;
  void SetContextMenu(raw_ptr<ElectronMenuModel> menu_model) override;

  std::unique_ptr<ohos::adapter::tray::StatusBarManager> _status_bar;
 private:
  void ConvertSkBitmapToTrayImage(const SkBitmap* bitmap,
                                  ohos::adapter::tray::TrayImage& trayImage);
};

}  // namespace electron

#endif  // ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_OHOS_H_
